Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/rest checksum crc64nvme #1096

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

lrm25
Copy link
Contributor

@lrm25 lrm25 commented Feb 27, 2025

No description provided.

@lrm25 lrm25 force-pushed the test/rest_checksum_crc64nvme branch from ccf8754 to 9097d2a Compare February 28, 2025 17:56
@lrm25 lrm25 force-pushed the test/rest_checksum_crc64nvme branch from b5a4573 to d10bd4d Compare February 28, 2025 19:30
import sys
from awscrt import checksums

with open(sys.argv[1], 'rb') as f:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like something that could be built into the test vm itself, so that we don't have to keep installing it. Perhaps as a pre-built script that is installed and can then be executed as needed?


@test "REST - PutObject rejects invalid sha256 checksum" {
test_file="test_file"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is set the same for all tests, should just be a default at the top of the test file.

}

@test "test_rest_versioning" {
test_file="test_file"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More shared settings.

crc64_file() {
source ./env/bin/activate
python3 -m pip install awscrt
if ! checksum=$(python3 -c "import sys;from awscrt import checksums;crc64nvme_value = checksums.crc64nvme(sys.argv[1]);print(crc64nvme_value)" "$1"); then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More of this little built in script - if we are doing repeat code then it really should be stored separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants